import { defineConfig } from 'rspress/config';
import { pluginUnpluginVue } from 'rsbuild-plugin-unplugin-vue';

export default defineConfig({
  root: 'docs',
  title: 'Rspress Vue Demo',
  description: 'A demo of integrating rsbuild-plugin-unplugin-vue with Rspress (supporting Vue & Angular)',
  builderPlugins: [
    pluginUnpluginVue({
      unpluginVueOptions: {
        include: ['**/*.vue'],
      },
    }),
  ],
  // 排除Angular相关文件，避免Rspress将它们作为路由处理
  route: {
    exclude: ['**/*.component.ts', '**/app.module.ts'],
  },
  markdown: {
    mdxRs: false,
  },
  // Add Angular specific configuration
  build: {
    alias: {
      '@angular/core': '@angular/core',
    },
    target: ['es2022'],
  },
});
